<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
                        <i class="fa  fa-fw fa-reorder"></i>ANDROID充值记录管理
                        </li>
                    </ol>
                </div>
            </div>
            <div class="row">
                <div class="col-md-2">
                    <a class="btn btn-success" href="javascript:void(0);">ANDROID充值记录</a>
                </div>
                <div class="col-md-10">
                    <form method="post" action="/admin_recharge_android">
                        <div class="form-group col-md-3">
                            <label>充值方式</label>
                            <select id='type' name="type">
                                <option value="-">--所有--</option>
                                <option value="1">支付宝</option>
                                <option value="2">微信</option>
                            </select>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="input-group date form_date_start" data-date="<?=date("Y-m-d",time())?>" data-date-format="yyyy-mm-dd" data-link-field="start">
                                <input class="form-control" size="16" type="text" value="" readonly placeholder="开始日期">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                            </div>
                            <input type="hidden" id="start" value="" name="start" /><br/>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="input-group date form_date_end" data-date="<?=date("Y-m-d",time())?>" data-date-format="yyyy-mm-dd" data-link-field="end">
                                <input class="form-control" size="16" type="text" value="" readonly placeholder="结束日期">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                            </div>
                            <input type="hidden" id="end" value="" name="end" /><br/>
                        </div>
                        <div class="form-group input-group col-md-3 pull-righ">
                            <input type="text" placeholder="输入订单号或手机号搜索" name="orderno" class="form-control">
                            <span class="input-group-btn">
                              <button type="button" class="btn btn-default" id="search"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>

            <div class="panel-body text-center">
                <table class="table table-hover" id="sample-table-1">
                    <thead>
                        <tr>
                            <td>编号</td>
                            <td>用户名</td>
                            <td>用户手机号</td>
                            <td>订单号</td>
                            <td>金额</td>
                            <td>康豆</td>
                            <td>订单生成时间</td>
                            <td>交易方式</td>
                        </tr>
                    </thead>
                    <?foreach($tDatas as $tRow){?>
                    <tr>
                        <td><?=$tRow['id']?></td>
                        <td><?=$tRow['name']?></td>
                        <td><?=$tRow['phone']?></td>
                        <td><?=$tRow['orderno']?></td>
                        <td><?=$tRow['money']?>&nbsp;&nbsp;&yen;</td>
                        <td><?=$tRow['kangdou']?></td>
                        <td><?=date('Y-m-d H:i:s',$tRow['created'])?></td>
                        <td><?=($tRow['type'] == 1)?"支付宝":"微信"?></td>
                    </tr>
                    <?}?>
                </table>
                <?=$tShow?>
                <div style="font-size:18px;font-weight:800;font-style:italic;text-decoration:underline;">
                    总充值金额：<?=sprintf("%.2f",$tSum['money'])?>&nbsp;&nbsp;&yen;&nbsp;&nbsp;
                    总充值康豆：<?=$tSum['kangdou']?>
                </div>
            </div>
        </div>
        <div class="subviews">
            <div class="subviews-container"></div>
        </div>
    </div>
    <!-- end: PAGE -->
</div>
<!-- end: MAIN CONTAINER -->

<script type="text/javascript" src="/plugins/datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$('.form_date_start').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 2,
    yearStart:2010,
    yearStart:2050,
    format:'yyyy-mm-dd',
    pickerPosition:"bottom-left",
    forceParse: 0
}).on("click",function(ev){
    start_date = $("#end").val().substr(0,10);
    $(".form_date_start").datetimepicker("setEndDate", start_date);
});
$('.form_date_end').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 2,
    yearStart:2010,
    yearStart:2050,
    format:'yyyy-mm-dd',
    pickerPosition:"bottom-left",
    forceParse: 0
}).on("click",function(ev){
    end_date = $("#start").val().substr(0,10);
    $(".form_date_end").datetimepicker("setStartDate", end_date);
});

</script>



<script>
$('#search').click(function(){
    $('form').submit();
});
</script>
<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
